<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Responder Solicitações</title>
</head>
<body>
	<f:view>
		<h2>Solicitações de Amizade</h2>
		
		<h:dataTable border="1" value="#{usuarioMB.solicitacoes}" var="solicitacao">
		<h:column>
			<h:outputText value="#{solicitacao.usuario1.nome}"></h:outputText>
			<f:facet name="header">
				<h:outputText value="Nome"></h:outputText>
			</f:facet>
		</h:column>
		<h:column>
			<h:outputText value="#{solicitacao.usuario1.email}"></h:outputText>
			<f:facet name="header">
				<h:outputText value="Email"></h:outputText>
			</f:facet>
		</h:column>	
		<h:column>
			<h:form>
				<h:commandButton value="Aceitar" action="#{usuarioMB.aceitarSolicitacao(solicitacao)}" ></h:commandButton>
				<h:commandButton value="Recusar" action="#{usuarioMB.recusarSolicitacao(solicitacao)}" ></h:commandButton>
			</h:form>
		</h:column>
	</h:dataTable>
	</f:view>
</body>
</html>